<?php

namespace App\model;

use Illuminate\Database\Eloquent\Model;

/**
 * App\ParkType
 *
 * @property int $id
 * @property string|null $name 园区类型
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\ParkType whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\ParkType whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\ParkType whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\ParkType whereUpdatedAt($value)
 * @mixin \Eloquent
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\ParkType newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\ParkType newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\ParkType query()
 */
class ParkType extends Model
{
    //
    protected $table="park_type";
    public static function getSelectOptions()
    {
        $options = \DB::table('park_type')->select('id','name as text')->get();
        $selectOption = [];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }

}
